package com.stone.config.exception;

import com.stone.bean.AppResponse;
import lombok.Data;

/**
 * @author stone
 * @date 2022/3/3 9:30
 */
@Data
public class BusinessException extends RuntimeException {

    private String message;
    private AppResponse appResponse;

    public BusinessException(String message) {
        this.message = message;
    }

    public BusinessException(AppResponse response) {
        this.appResponse = response;
        this.message = response.getMessage();
    }
}
